<header class="layout head padding-small">
    <a href="javascript:back(true);" class="hBack float-left"></a>
    <h4 class="hTxt float-left text-center text-white">收货地址管理</h4>
    <a href="javascript:;" id="btnJdkey" class="hHlep float-right"></a>
</header>
<style>
    .address-con ul{padding-left:5px;}
    .address-con ul li{margin-bottom:5px;}
</style>
<div class="address-con margin">
    <?php if(!empty($output['address_list']) && is_array($output['address_list'])){?>
        <ul>
        <?php foreach($output['address_list'] as $item){?>
            <li>
            <div class="gri-con-list bg-white padding height radius-big">
            <div class="clearfix padding-small-bottom" >
            <span class="gri-userName text-red x4"><?php echo $item['true_name']?></span>
            <span class="gri-mobile x4 text-red text-center"><?php echo $item['mob_phone']?></span>
            <span class="x4 text-right"><?php echo $item['zip_code']?></span>
        </div>
        <div class="address text-small"><?php echo $item['area_info']."\t".$item['address']?></div>
        <div class="text-right">
            <a url="index.php?act=member_index&op=address_mod&address_id=<?php echo $item['address_id']?>" class="padding-right app_onclick">编辑</a>|
            <a href="javascript:void(0);" addressid="<?php echo $item['address_id']?>" onclick="delClick(this);" class="padding-left">删除</a>
        </div>
            </div></li>
    <?php }?>
            </ul>
            <?php }else{?>
        <ul> <li class="noTxt">
                <div class="text-center text-gray padding-large">
                    <i class="icon-meh-o"></i>
                    <p>暂无相关的数据记录。</p>
                </div>
            </li></ul>
<?php }?>
    <a url="index.php?act=member_index&op=address_mod" class="text-white margin-top layout text-center bg-red padding height radius-big app_onclick">+添加收货地址</a>
</div>
<script type="text/javascript">

	function  delClick(param){
		if (confirm("确定要删除收货地址吗？")){
			   var id = $(param).attr("addressId");
				jQuery.getJSON('index.php?act=member_index&op=address&t=del',{address_id:id},
				function(data){
					Jump(data);
					if(data.state){ 
						$(param).parents('li').remove();
					}
				});
		}
	}

</script>


